<template>
    <div>
        <div class="add">
            <div class="header">
                <Icon class="back" type="md-arrow-back" :size="25" title="返回" @click="back" />
                <Icon class="send" type="md-paper-plane" :size="25" title="发送" @click="add()"/>
            </div>
            <div class="content">
                <img src="../assets/images/timg4.jpg"/>
                <p class="fullname">下雪</p>
                <p class="talk">郑州（男 20岁）</p>
                <Input v-model="value" type="textarea" :autosize="{minRows: 5,maxRows: 5}" placeholder="Enter something..." style="margin-top:20px;"/>
            </div>
        </div>
    </div>
</template>

<script>
  export default {
    data () {
      return {
        value: 'qqq'
      }
    },
    methods: {
      // 返回
      back () {
        this.$router.push({path: '/home'})
      },
      // 添加
      add (res = true) {
        console.log(res)
        if (res === true) {
          this.$Notice.success({
            title: '添加成功！',
            desc: '',
            duration: 1
          })
          this.$router.back(-1)
        } else {
          this.$Notice.error({
            title: '添加失败',
            desc: '',
            duration: 1
          })
        }
      }
    }
  }
</script>

<style lang="less" scoped>
.add{
    width: 320px;
    height: 540px;
    background-color: #fff;
    position: relative;
    border-radius: 4px;
    .header{
        position: relative;
        width: 100%;
        height: 40px;
        color: #fff;
        background-color: #2d8cf0;
        .back{
            float: left;
            margin-left: 10px;
            line-height: 40px;
        }
        .send{
            float: right;
            margin-right: 10px;
            line-height: 40px;
        }
    }
    .content{
        height: 340px;
        margin-top: 20px;
        padding: 10px;
        img{
            width: 80px;
            height: 80px;
            border-radius: 50%;
            float: left;
        }
        .fullname{
            width: 200px;
            height: 40px;
            float: left;
            margin-left: 20px;
            color: #333;
            font-size: 20px;
            font-weight: 700;
            text-align: center;
            line-height: 40px;
        }
        .talk{
            width: 200px;
            height: 40px;
            float: left;
            margin-left: 20px;
            color: #777;
            font-size: 14px;
            text-align: center;
            line-height: 30px;
        }
    }
}
  
</style>


